home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / computerjanitor / plugins / remove_lilo_plugin.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-10-12  |  1.4 KB  |  31 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import os
  5. import logging
  6. import computerjanitor
  7. _ = computerjanitor.setup_gettext()
  8.  
  9. class RemoveLiloPlugin(computerjanitor.Plugin):
  10.     '''Plugin to remove lilo if grub is also installed.'''
  11.     description = _('Remove lilo since grub is also installed.(See bug #314004 for details.)')
  12.     
  13.     def __init__(self):
  14.         self.condition = [
  15.             'jauntyPostDistUpgradeCache']
  16.  
  17.     
  18.     def get_cruft(self):
  19.         if 'lilo' in self.app.apt_cache and 'grub' in self.app.apt_cache:
  20.             lilo = self.app.apt_cache['lilo']
  21.             grub = self.app.apt_cache['grub']
  22.             if lilo.isInstalled and grub.isInstalled:
  23.                 if not os.path.exists('/etc/lilo.conf'):
  24.                     yield computerjanitor.PackageCruft(lilo, self.description)
  25.                 else:
  26.                     logging.warning('lilo and grub installed, but lilo.conf exists')
  27.             
  28.         
  29.  
  30.  
  31.